﻿using Bilibili.Model.Common;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace Avalonia.BiliBili.Libs.Models.View
{
    public sealed class TabControlItem<T>
    {
        /// <summary>
        /// 唯一标识
        /// </summary>
        public string Id { get; }
        public TabControlItem()
        {
            Id = Guid.NewGuid().ToString("N");
            Nodes = new ObservableCollection<T>();
        }
        public TabControlItem(string header) : this()
        {
            this.Header = header;
        }
        public TabControlItem(string header, int tag) : this()
        {
            this.Tag = tag;
            this.Header = header;
        }
        public object Tag { get; set; }
        /// <summary>
        /// 标头
        /// </summary>
        public string Header { get; set; }
        /// <summary>
        /// 下拉框
        /// </summary>
        public IEnumerable<Category> Type { get; set; }
        /// <summary>
        /// 列表
        /// </summary>
        public ObservableCollection<T> Nodes { get; private set; }
    }
}